<template>
  <view>
<!--    <view class="cu-bar bg-white margin-top-xs">-->
<!--      <view class="action sub-title">-->
<!--        <text class="text-xl text-bold text-shadow text-custom">团队长信息</text>-->
<!--        <text class="text-ABC text-custom">SALESMAN</text>-->
<!--      </view>-->
<!--    </view>-->
    <view class="cu-bar bg-white margin-top-xs">
      <text class="txt-shxx">区域合伙人信息</text>
    </view>
    <view>
      <view class="cu-form-group">
        <view class="vlabel"><font class="vname">姓名:</font>{{adminInfo.name}}</view>
      </view>
      <view class="cu-form-group">
        <view class="vlabel"><font class="vname"> 手机号码:</font>{{adminInfo.phone}}</view>
      </view>
      <view class="cu-form-group">
        <view class="vlabel"><font class="vname"> 个人介绍:</font>{{adminInfo.remark}}</view>
      </view>
    </view>

<!--    <view class="cu-bar bg-white margin-top-xs">-->
<!--      <view class="action sub-title">-->
<!--        <text class="text-xl text-bold  text-shadow text-custom">商户信息</text>-->
<!--        <text class="text-ABC  text-custom">SHOP</text>-->
<!--      </view>-->
<!--    </view>-->
    <view class="cu-bar bg-white margin-top-xs">
      <text class="txt-shxx">商户信息</text>
    </view>
    <view class="cu-list menu sm-border"  >
      <shop-one-list v-for="(item,idx) in shops" :shop="item" ></shop-one-list>
    </view>

    <view class="cu-bar bg-white margin-top-xs">
      <text class="txt-shxx">订单信息</text>
    </view>
    <view class="cu-list menu-avatar ">
      <order-one-list  v-for="(item,idx) in orders" :order="item"></order-one-list>
    </view>
  </view>
</template>

<script setup lang="ts">
import {onLoad} from '@dcloudio/uni-app'
import {ref, onMounted, computed, reactive} from 'vue';
import {teamDetail} from '../../common/api/user'
import OrderOneList from "../../components/OrderOneList.vue";
import ShopOneList from "../../components/ShopOneList.vue";
const shops = ref([])
const adminInfo = ref({})
const orders = ref([])
const id = ref(0)

onLoad(option => {
  id.value = option.id
})
onMounted(async () => {
  if (id.value) {
    await teamDetail(id.value).then(res => {
      adminInfo.value = res.data.admin
      shops.value = res.data.shops
      orders.value = res.data.orders
    })
  }
})
</script>

<style lang="scss" scoped>
.txt-shxx{
  font-weight: bold;
  font-size: 34rpx;
  color: #1A1A1A;
  margin-left: 20rpx;
}
</style>
